package ai.people.netmon.framework.domain.archives.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * 档案图片
 *
 * @author zhenglin
 * @since 2022-04-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(schema = "webservice",value = "person_archives_images")
public class ArchivesImages implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long id;

    /**
     * 文件名称
     */
    private String imageName;

    /**
     * 文件内容
     */
    private byte[] content;

    /**
     * 上传时间
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public String wrapperId(){
        return String.valueOf(id);
    }

}
